EchoPro Kriging mesh Workflow
Contents
EchoPro Kriging mesh Workflow#
Import libraries and configure the Jupyter notebook#
# libraries used in the Notebook
import matplotlib.pyplot as plt
import geopandas
import folium
# Python version of EchoPro
import EchoPro
# obtain all visualization routines
from EchoPro.visualization import plot_layered_points, plot_points
Set up EchoPro for a specific survey year#
Initialize EchoPro object using configuration files#
initialization_config.yml– parameters independent of survey yearsurvey_year_2019_config.yml– parameters specific to survey yearsource– Define the region of data to use e.g. US, CAN, US & CANexclude_age1– States whether age 1 hake should be included in analysis.
%%time
survey_2019 = EchoPro.Survey(init_file_path='../config_files/initialization_config.yml',
survey_year_file_path='../config_files/survey_year_2019_config.yml',
source=3,
exclude_age1=True)
A full check of the initialization file contents needs to be done!
A check of the survey year file contents needs to be done!
CPU times: user 5.36 ms, sys: 586 µs, total: 5.95 ms
Wall time: 6.03 ms
Load and process input data#
This data is stored in
survey_2019
%%time
survey_2019.load_survey_data()
CPU times: user 1.39 s, sys: 16.9 ms, total: 1.41 s
Wall time: 1.41 s
Compute the areal biomass density#
The areal biomass density is stored in
survey_2019.bio_calc.transect_results_gdfasbiomass_density_adult
%%time
survey_2019.compute_biomass_density()
CPU times: user 343 ms, sys: 0 ns, total: 343 ms
Wall time: 343 ms
Obtain Kriging Mesh Data#
Access Kriging mesh object#
Reads mesh data files specified by
survey_2019
krig_mesh = survey_2019.get_kriging_mesh()
Plot the Mesh, Transects and smoothed isobath contour#
Generate interactive map using the Folium package
Mesh points are in gray
Transect points are represented by a changing color gradient
Smoothed contour points (200m isobath) are in blue
fmap = plot_layered_points(krig_mesh)
fmap
Make this Notebook Trusted to load map: File -> Trust Notebook